#include "stdafx.h"
#include "ResourceMinimap.h"
#include "MinimapTile.h"

size_t ResourceMinimap::size() const
{
	return m_pTexture ? m_pTexture->getMemorySize() : 0;
}

void ResourceMinimap::release()
{
	safeRelease(m_pTexture);
	delete this;
}

bool ResourceMinimap::load(const ulong uResID)
{
	m_pMinimapTile = (MinimapTile*)uResID;
	m_pTexture = m_pMinimapTile->loadResource();

	return m_pTexture != 0;
}

void* ResourceMinimap::getInnerData()
{
	return (void*)m_pTexture;
}